package com.voltmao.persistent.mapper;

import org.apache.ibatis.annotations.Param;
import com.voltmao.persistent.model.DocDb;
import com.voltmao.persistent.model.DocDbCriteria;

import java.util.List;
import java.util.Map;

public interface DocDbMapper {
    int countByExample(DocDbCriteria example);

    int deleteByExample(DocDbCriteria example);

    int deleteByPrimaryKey(String dataId);

    int insert(DocDb record);

    int insertSelective(DocDb record);

    List<DocDb> selectByExample(DocDbCriteria example);

    DocDb selectByPrimaryKey(String dataId);

    int updateByExampleSelective(@Param("record") DocDb record, @Param("example") DocDbCriteria example);

    int updateByExample(@Param("record") DocDb record, @Param("example") DocDbCriteria example);

    int updateByPrimaryKeySelective(DocDb record);

    int updateByPrimaryKey(DocDb record);

    DocDb selectByExampleForOne(DocDbCriteria example);

    Map<String, Object> selectMapByPrimaryKey(String dataId);

    Map<String, Object> selectMapByExampleForOne(DocDbCriteria example);

    List<Map<String, Object>> selectMapByExample(DocDbCriteria example);

    /**
     * 获取文档列表
     * */
    List<Map<String, Object>> getDocs(Map<String, Object> params);
    int countDocs(Map<String, Object> params);

    /**
     * 获取渠道商申请的资料
     */
    List<Map<String, Object>> getApplyDocs(@Param("providerId") String providerId, @Param("docName") String docName,
                                           @Param("limitStart") int limitStart, @Param("pageSize") int pageSize,
                                           @Param("docType") String docType);
    int countApplyDocs(@Param("providerId") String providerId, @Param("docName") String docName,
                       @Param("docType") String docType);
}